/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bitoon.basketdudes.jpa;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author paco
 */
@Embeddable
public class RopaJugadorPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "jugador_id")
    private int jugadorId;
    @Basic(optional = false)
    @Column(name = "slot")
    private short slot;

    public RopaJugadorPK() {
    }

    public RopaJugadorPK(int jugadorId, short slot) {
        this.jugadorId = jugadorId;
        this.slot = slot;
    }

    public int getJugadorId() {
        return jugadorId;
    }

    public void setJugadorId(int jugadorId) {
        this.jugadorId = jugadorId;
    }

    public short getSlot() {
        return slot;
    }

    public void setSlot(short slot) {
        this.slot = slot;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) jugadorId;
        hash += (int) slot;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RopaJugadorPK)) {
            return false;
        }
        RopaJugadorPK other = (RopaJugadorPK) object;
        if (this.jugadorId != other.jugadorId) {
            return false;
        }
        if (this.slot != other.slot) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bitoon.basketdudes.jpa.RopaJugadorPK[jugadorId=" + jugadorId + ", slot=" + slot + "]";
    }

}
